﻿/*
* Activity Tracking Log v0.1.1 - http://activitytrackinglog.codeplex.com
* Activity Tracking Log for ASP.Net & ASP.Net MVC
* Copyright (c) 2011 Vadim Burac
* Licensed under the Microsoft Public License (Ms-PL)
* http://activitytrackinglog.codeplex.com/license
*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ActivityTrackingLog.Utils;
using ActivityTrackingLog.Configuration;
using ActivityTrackingLog.Data;

namespace ActivityTrackingLog.Storage.Implementations
{
    internal class InMemoryRepository : BaseRepository
    {
        #region private data

        private static List<ActivityItem> _activityListStorage = null;
        private static List<UserAgentItem> _userAgentListStorage = null;

        #endregion

        #region properties

        public static List<ActivityItem> ActivityListStorage
        {
            get
            {
                return _activityListStorage;
            }
        }

        public static List<UserAgentItem> UserAgentListStorage
        {
            get
            {
                return _userAgentListStorage;
            }
        }

        #endregion

        #region ctors

        static InMemoryRepository()
        {
            _activityListStorage = new List<ActivityItem>();
            _userAgentListStorage = new List<UserAgentItem>();
        }

        #endregion

        #region overriden base methods

        protected override BaseContext GetContext()
        {
            return new InMemoryContext();
        }

        #endregion
    }
}
